var flag=1;
$('#rightArrow').click(function(){
	if(flag==1){
		$("#floatDivBoxs").animate({right: '0px'},300);
		$(this).animate({right: '170px'},300);

		flag=0;
	}else{
		$("#floatDivBoxs").animate({right: '-170'},300);
		$(this).animate({right: '0px'},300);

		flag=1;
	}
});

jQuery(document).ready(function($){
	// browser window scroll (in pixels) after which the "back to top" link is shown
	var offset = 300,
		//browser window scroll (in pixels) after which the "back to top" link opacity is reduced
		offset_opacity = 1200,
		//duration of the top scrolling animation (in ms)
		scroll_top_duration = 700,
		//grab the "back to top" link
		$back_to_top = $('.cd-top');
		$back_to_tpp = $('.icon_circle');

	//hide or show the "back to top" link
	$(window).scroll(function(){
		( $(this).scrollTop() > offset ) ? $back_to_top.addClass('cd-is-visible') : $back_to_top.removeClass('cd-is-visible cd-fade-out');
		if( $(this).scrollTop() > offset_opacity ) { 
			$back_to_top.addClass('cd-fade-out');
		}
	});

	//smooth scroll to top
	$back_to_top.on('click', function(event){
		event.preventDefault();
		$('body,html').animate({
			scrollTop: 0 ,
		 	}, scroll_top_duration
		);
	});

//1111
$(window).scroll(function(){
	
		if( $(this).scrollTop()>offset_opacity ) { 
			$back_to_tpp.addClass('icon_circle_active');
		}else{
			$back_to_tpp.removeClass('icon_circle_active');
		}
	});

	
});